﻿using QuanLyDaiLy.View;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace QuanLyDaiLy
{
    /// <summary>
    /// Interaction logic for WWaitPopu.xaml
    /// </summary>
    public partial class WWaitPopup : Window
    {
        #region Variable
        Main exewindow;
        #endregion

        #region Constructor
        public WWaitPopup()
        {
            this.InitializeComponent();

            // Insert code required on object creation below this point.
        }

        public WWaitPopup(ref Main exewindow)
        {
            this.InitializeComponent();
            this.exewindow = exewindow;
        }
        #endregion

        #region Function
        private void TrangThaiHienThi()
        {
            exewindow = new Main(this.Owner as wLogin);
            exewindow.TaoLienKet();
            exewindow.Show();
        }
        #endregion

        #region Event
        public void TaoLienKet()
        {
            TrangThaiHienThi();
        }

        private void Window_Activated_1(object sender, EventArgs e)
        {
            TaoLienKet();
        }
        #endregion

        private void Window_Activated_2(object sender, EventArgs e)
        {

        }
    }
}